import { IsNotEmpty, Length } from "class-validator";

export class CreateUserDto {
    @IsNotEmpty({
        message: '用户名不能为空'
    })
    @Length(3, 10, {
        message: '用户名长度在3-10位之间'
    })
    userName: string;
    @IsNotEmpty({
        message: '密码不能为空'
    })
    @Length(6, 12, {
        message: '密码长度在6-12位之间'
    })
    password: string;
}
